package com.ruoyi.user.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.user.mapper.AgentReviewsMapper;
import com.ruoyi.user.domain.AgentReviews;
import com.ruoyi.user.service.IAgentReviewsService;

/**
 * 经纪人点评Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
public class AgentReviewsServiceImpl implements IAgentReviewsService 
{
    @Autowired
    private AgentReviewsMapper agentReviewsMapper;

    /**
     * 查询经纪人点评
     * 
     * @param id 经纪人点评主键
     * @return 经纪人点评
     */
    @Override
    public AgentReviews selectAgentReviewsById(Integer id)
    {
        return agentReviewsMapper.selectAgentReviewsById(id);
    }

    /**
     * 查询经纪人点评列表
     * 
     * @param agentReviews 经纪人点评
     * @return 经纪人点评
     */
    @Override
    public List<AgentReviews> selectAgentReviewsList(AgentReviews agentReviews)
    {
        return agentReviewsMapper.selectAgentReviewsList(agentReviews);
    }

    /**
     * 新增经纪人点评
     * 
     * @param agentReviews 经纪人点评
     * @return 结果
     */
    @Override
    public int insertAgentReviews(AgentReviews agentReviews)
    {
        agentReviews.setCreateTime(DateUtils.getNowDate());
        return agentReviewsMapper.insertAgentReviews(agentReviews);
    }

    /**
     * 修改经纪人点评
     * 
     * @param agentReviews 经纪人点评
     * @return 结果
     */
    @Override
    public int updateAgentReviews(AgentReviews agentReviews)
    {
        return agentReviewsMapper.updateAgentReviews(agentReviews);
    }

    /**
     * 批量删除经纪人点评
     * 
     * @param ids 需要删除的经纪人点评主键
     * @return 结果
     */
    @Override
    public int deleteAgentReviewsByIds(Integer[] ids)
    {
        return agentReviewsMapper.deleteAgentReviewsByIds(ids);
    }

    /**
     * 删除经纪人点评信息
     * 
     * @param id 经纪人点评主键
     * @return 结果
     */
    @Override
    public int deleteAgentReviewsById(Integer id)
    {
        return agentReviewsMapper.deleteAgentReviewsById(id);
    }
}
